import { ApiProperty, PartialType, ApiPropertyOptional } from '@nestjs/swagger';
import { IsOptional } from 'class-validator';

export class RoleDto {
  @ApiProperty({ description: 'id' })
  @IsOptional()
  id?: string;

  @ApiProperty({ description: '角色名称' })
  roleName?: string;
}

export class QueryRoleDto {
  // roleName 角色名
  @ApiPropertyOptional({ description: '角色名' })
  @IsOptional()
  roleName: string;
}

export class RoleUpdateDto extends PartialType(RoleDto) {}
